/*云闪推——购买记录*/

import request from '@/utils/request';
import {object2Url} from "@/utils/trans";


// 分页查询购买记录
export async function queryCameraRecord (data) {
  const res = await request.post('/business/cameraRecord/page', data)
  if (res.data.code === 2000) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.msg));
}


// 删除购买记录
export async function delCameraRecord (data) {
  const res = await request.post('/business/cameraRecord/delete', data)
  if (res.data.code === 2000) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.msg));
}

// 购买记录统计图
export async function queryByStatistics (data) {
  const res = await request.post('/business/cameraRecord/selectByStatistics', data)
  if (res.data.code === 2000) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.msg));
}


